-- CALC_ANUBIS_BONUS

return function(user, bonus)
    local bonusList = {};

    local bonusList1 = {[1] = {["bonus"] = {1, 1511, 1}, ["ratio"] = 40},
                    [2] = {["bonus"] = {1, 1511, 2}, ["ratio"] = 30},
    };

    local bonusList2 = {[1] = {["bonus"] = {1, 1511, 1}, ["ratio"] = 40},
                    [2] = {["bonus"] = {1, 1511, 2}, ["ratio"] = 30},
                    [3] = {["bonus"] = {1, 1512, 3}, ["ratio"] = 30},
    };

    local bonusTimes = CaveHideItemM.getCaveBuildingBonusTimes(795);

    -- 奖励次数
    if bonusTimes < 3 then
        bonusList = bonusList2;
    else
        bonusList = bonusList1;
    end

    -- 根据权重抽取
    local rand = DungeonM.getRandSeed("anubis_bonus_rand");
    local anubisBonusInfo = fetchElemBySeed(bonusList, rand);
    local anuBonus = anubisBonusInfo["bonus"];

    return anuBonus;
end